using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._PointCloud._Classification
{
    /// <summary>
    /// <para>Classify LAS By Height</para>
    /// <para>Reclassifies lidar points based on their height from the ground surface.</para>
    /// <para>根据激光雷达点距地面的高度对激光雷达点进行重新分类。</para>
    /// </summary>    
    [DisplayName("Classify LAS By Height")]
    public class ClassifyLasByHeight : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ClassifyLasByHeight()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset that will be processed. Only LAS points with class code values of 0 and 1 will be evaluated.</para>
        /// <para>将处理的 LAS 数据集。仅评估类代码值为 0 和 1 的 LAS 点。</para>
        /// </param>
        /// <param name="_ground_source">
        /// <para>Ground Source</para>
        /// <para><xdoc>
        ///   <para>Specifies the source of ground measurements that will be used to determine height above ground.</para>
        ///   <bulletList>
        ///     <bullet_item>All Ground Points—LAS points designated with the ground classification code value of 2 and model key code value of 8 will be used.</bullet_item><para/>
        ///     <bullet_item>Model Key Points—Only LAS points designated with the model key classification code value of 8 will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于确定离地高度的地面测量值的来源。</para>
        ///   <bulletList>
        ///     <bullet_item>所有接地点—将使用以接地分类代码值 2 和模型键代码值 8 指定的 LAS 点。</bullet_item><para/>
        ///     <bullet_item>模型关键点—仅使用以模型关键分类代码值 8 指定的 LAS 点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_height_classification">
        /// <para>Height Classification</para>
        /// <para>The class code and maximum height from ground that will be used to reclassify LAS points. The order of the classes in the table will define the range of z-values that will be used to process the reclassification. The z-range of the first entry will span from the ground surface to the specified Height From Ground value. The z-range of subsequent entries will span from the upper limit of the preceding entry to its own Height From Ground value.</para>
        /// <para>将用于对 LAS 点进行重分类的类代码和离地面的最大高度。表中类的顺序将定义将用于处理重新分类的 z 值的范围。第一个条目的 z 范围将从地面跨越到指定的“距地面高度”值。后续条目的 z 范围将从前一个条目的上限跨越到其自己的“离地高度”值。</para>
        /// </param>
        public ClassifyLasByHeight(object _in_las_dataset, _ground_source_value _ground_source, object _height_classification)
        {
            this._in_las_dataset = _in_las_dataset;
            this._ground_source = _ground_source;
            this._height_classification = _height_classification;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Classify LAS By Height";

        public override string CallName => "3d.ClassifyLasByHeight";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _ground_source.GetGPValue(), _height_classification, _noise.GetGPValue(), _compute_stats.GetGPValue(), _extent, _process_entire_files.GetGPValue(), _boundary, _out_las_dataset, _update_pyramid.GetGPValue()];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset that will be processed. Only LAS points with class code values of 0 and 1 will be evaluated.</para>
        /// <para>将处理的 LAS 数据集。仅评估类代码值为 0 和 1 的 LAS 点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Ground Source</para>
        /// <para><xdoc>
        ///   <para>Specifies the source of ground measurements that will be used to determine height above ground.</para>
        ///   <bulletList>
        ///     <bullet_item>All Ground Points—LAS points designated with the ground classification code value of 2 and model key code value of 8 will be used.</bullet_item><para/>
        ///     <bullet_item>Model Key Points—Only LAS points designated with the model key classification code value of 8 will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于确定离地高度的地面测量值的来源。</para>
        ///   <bulletList>
        ///     <bullet_item>所有接地点—将使用以接地分类代码值 2 和模型键代码值 8 指定的 LAS 点。</bullet_item><para/>
        ///     <bullet_item>模型关键点—仅使用以模型关键分类代码值 8 指定的 LAS 点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ground Source")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _ground_source_value _ground_source { get; set; }

        public enum _ground_source_value
        {
            /// <summary>
            /// <para>All Ground Points</para>
            /// <para>All Ground Points—LAS points designated with the ground classification code value of 2 and model key code value of 8 will be used.</para>
            /// <para>所有接地点—将使用以接地分类代码值 2 和模型键代码值 8 指定的 LAS 点。</para>
            /// </summary>
            [Description("All Ground Points")]
            [GPEnumValue("GROUND")]
            _GROUND,

            /// <summary>
            /// <para>Model Key Points</para>
            /// <para>Model Key Points—Only LAS points designated with the model key classification code value of 8 will be used.</para>
            /// <para>模型关键点—仅使用以模型关键分类代码值 8 指定的 LAS 点。</para>
            /// </summary>
            [Description("Model Key Points")]
            [GPEnumValue("MODEL_KEY")]
            _MODEL_KEY,

        }

        /// <summary>
        /// <para>Height Classification</para>
        /// <para>The class code and maximum height from ground that will be used to reclassify LAS points. The order of the classes in the table will define the range of z-values that will be used to process the reclassification. The z-range of the first entry will span from the ground surface to the specified Height From Ground value. The z-range of subsequent entries will span from the upper limit of the preceding entry to its own Height From Ground value.</para>
        /// <para>将用于对 LAS 点进行重分类的类代码和离地面的最大高度。表中类的顺序将定义将用于处理重新分类的 z 值的范围。第一个条目的 z 范围将从地面跨越到指定的“距地面高度”值。后续条目的 z 范围将从前一个条目的上限跨越到其自己的“离地高度”值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Height Classification")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _height_classification { get; set; }


        /// <summary>
        /// <para>Noise Classification</para>
        /// <para><xdoc>
        ///   <para>Specifies whether and how points will be reclassified as noise based on their proximity from the ground. Noise artifacts in lidar data can be introduced by sensor errors and the inadvertent interception of aerial obstructions, such as birds, in the path of the lidar pulse.</para>
        ///   <bulletList>
        ///     <bullet_item>Low and High Noise—Both low and high noise will be classified.</bullet_item><para/>
        ///     <bullet_item>High Noise—Only points that are above the maximum height in the LAS classification table will be reclassified as high noise.</bullet_item><para/>
        ///     <bullet_item>Low Noise—Only points below the ground surface will be reclassified as noise. This option is only available when all ground points are used to define the ground surface.</bullet_item><para/>
        ///     <bullet_item>None—No points will be reclassified as noise.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否以及如何根据点与地面的距离将点重新分类为噪声。激光雷达数据中的噪声伪影可能是由于传感器误差和无意中拦截了激光雷达脉冲路径中的空中障碍物（例如鸟类）而引入的。</para>
        ///   <bulletList>
        ///     <bullet_item>低噪声和高噪声—低噪声和高噪声都将分类。</bullet_item><para/>
        ///     <bullet_item>高噪声—只有高于 LAS 分类表中最大高度的点才会被重新分类为高噪声。</bullet_item><para/>
        ///     <bullet_item>低噪声 - 只有地表以下的点才会被重新分类为噪声。仅当使用所有接地点来定义地表面时，此选项才可用。</bullet_item><para/>
        ///     <bullet_item>无 - 任何点都不会被重新分类为噪声。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Noise Classification")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _noise_value _noise { get; set; } = _noise_value._NONE;

        public enum _noise_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None—No points will be reclassified as noise.</para>
            /// <para>无 - 任何点都不会被重新分类为噪声。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Low Noise</para>
            /// <para>Low Noise—Only points below the ground surface will be reclassified as noise. This option is only available when all ground points are used to define the ground surface.</para>
            /// <para>低噪声 - 只有地表以下的点才会被重新分类为噪声。仅当使用所有接地点来定义地表面时，此选项才可用。</para>
            /// </summary>
            [Description("Low Noise")]
            [GPEnumValue("LOW_NOISE")]
            _LOW_NOISE,

            /// <summary>
            /// <para>High Noise</para>
            /// <para>High Noise—Only points that are above the maximum height in the LAS classification table will be reclassified as high noise.</para>
            /// <para>高噪声—只有高于 LAS 分类表中最大高度的点才会被重新分类为高噪声。</para>
            /// </summary>
            [Description("High Noise")]
            [GPEnumValue("HIGH_NOISE")]
            _HIGH_NOISE,

            /// <summary>
            /// <para>Low and High Noise</para>
            /// <para>Low and High Noise—Both low and high noise will be classified.</para>
            /// <para>低噪声和高噪声—低噪声和高噪声都将分类。</para>
            /// </summary>
            [Description("Low and High Noise")]
            [GPEnumValue("ALL_NOISE")]
            _ALL_NOISE,

        }

        /// <summary>
        /// <para>Compute statistics</para>
        /// <para><xdoc>
        ///   <para>Specifies whether statistics will be computed for the .las files referenced by the LAS dataset. Computing statistics provides a spatial index for each .las file, which improves analysis and display performance. Statistics also enhance the filtering and symbology experience by limiting the display of LAS attributes, such as classification codes and return information, to values that are present in the .las file.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Statistics will be computed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Statistics will not be computed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为 LAS 数据集引用的 .las 文件计算统计数据。计算统计为每个 .las 文件提供空间索引，从而提高分析和显示性能。统计数据还通过将 LAS 属性（如分类代码和返回信息）的显示限制为 .las 文件中存在的值来增强过滤和符号系统体验。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将计算统计数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—不计算统计数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute statistics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compute_stats_value _compute_stats { get; set; } = _compute_stats_value._true;

        public enum _compute_stats_value
        {
            /// <summary>
            /// <para>COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPUTE_STATS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_COMPUTE_STATS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Processing Extent</para>
        /// <para><xdoc>
        ///   <para>The extent of the data that will be evaluated.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将评估的数据范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Process entire LAS files that intersect extent</para>
        /// <para><xdoc>
        ///   <para>Specifies how the processing extent will be applied.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Only LAS points that are within the processing extent will be evaluated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—All points in the .las files that intersect the processing extent will be evaluated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何应用处理范围。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 仅评估处理范围内的 LAS 点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 将评估 .las 文件中与处理范围相交的所有点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Process entire LAS files that intersect extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _process_entire_files_value _process_entire_files { get; set; } = _process_entire_files_value._false;

        public enum _process_entire_files_value
        {
            /// <summary>
            /// <para>PROCESS_ENTIRE_FILES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_ENTIRE_FILES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>PROCESS_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_EXTENT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Processing Boundary</para>
        /// <para>A polygon feature that defines the region for which LAS ground points will be evaluated.</para>
        /// <para>用于定义将评估 LAS 地面点的区域的面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Boundary")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _boundary { get; set; } = null;


        /// <summary>
        /// <para>Updated Input LAS Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_las_dataset { get; set; }


        /// <summary>
        /// <para>Update pyramid</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the LAS dataset pyramid will be updated after the class codes are modified.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The LAS dataset pyramid will be updated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The LAS dataset pyramid will not be updated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定修改类代码后是否更新 LAS 数据集金字塔。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将更新 LAS 数据集金字塔。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—LAS 数据集金字塔将不会更新。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update pyramid")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_pyramid_value _update_pyramid { get; set; } = _update_pyramid_value._true;

        public enum _update_pyramid_value
        {
            /// <summary>
            /// <para>UPDATE_PYRAMID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_PYRAMID")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_UPDATE_PYRAMID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_UPDATE_PYRAMID")]
            [GPEnumValue("false")]
            _false,

        }

        public ClassifyLasByHeight SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}